<script type="text/javascript">
function checkpsd(){
	if(document.getElementById("psd").value==document.getElementById("npsd").value){
		{
			if(document.getElementById("psd").value.length<6 || document.getElementById("psd").value.length>16)
			{
				document.getElementById("error").innerHTML= "Passwords Should be between 6 and 16 characters ";
				return false;
			}else return true;
		}
	}else
	{
		document.getElementById("error").innerHTML= "Passwords do not match";
		return false;
	}
  
}
</script>
<form name="form1" method="post" action="">
  <table width="80%" border="0" cellspacing="0" cellpadding="4" id="allround" style="margin:auto">
    <tr>
      <th colspan="2">Change Password</th>
    </tr>
    <tr>
      <td colspan="2"><div id="error" style="width:70%;margin:auto"><?php echo $msg; ?></div></td>
    </tr>
    <tr>
      <td>Username</td>
      <td><strong><?php echo $_SESSION['maUserAdmin']; ?></strong></td>
    </tr>
    <tr>
      <td width="41%">New Password</td>
      <td width="59%"><label>
        <input type="password" name="psd" id="psd" class="input200">
      </label></td>
    </tr>
    <tr>
      <td>Confirm new password</td>
      <td><input type="password" name="npsd" id="npsd"  class="input200"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="change password" onclick="return checkpsd()" />        <input type="hidden" name="changepsdfrmadd" id="changepsdfrmadd"></td>
    </tr>
  </table>
</form>
